<template>


  <v-form>
    <v-container>
      <v-layout row wrap>


        <v-flex xs12 sm6 md3>
          <v-text-field
            label="fx"
            placeholder="fx"
            v-model="filePoint.fx"
            :rules="rules.fxRule"

          ></v-text-field>
        </v-flex>

        <v-flex xs12 sm6 md3>
          <v-text-field
            label="fy"
            placeholder="fy"
            v-model="filePoint.fy"
            :rules="rules.fyRule"
          ></v-text-field>
        </v-flex>

        <v-btn @click="addFiledPoint" color="info" id="gs">增加点</v-btn>
      </v-layout>
    </v-container>
  </v-form>

</template>

<script>
  export default {
    name: "Test",
    data() {
      return {
        filePoint: {
          fx: "",
          fy: ""
        },
        rules: {
          fxRule: [
            v => /[1-9]\d*\.\d*|0\.\d*[1-9]\d*/.test(v) || "fx浮点数"
          ], fyRule: [
            v => /[1-9]\d*\.\d*|0\.\d*[1-9]\d*/.test(v) || "fy浮点数"
          ]
        }

      }
    },

    methods: {

      addFiledPoint() {
        console.log(this.filePoint.fx, this.filePoint.fy);
      }
    },
    computed: {}

  }
</script>

<style scoped>

</style>
